<HTML
><HEAD
><TITLE
>GR_EVENT_MOUSE</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
"><LINK
REL="HOME"
TITLE="Nano-X Library API"
HREF="index.html"><LINK
REL="UP"
TITLE="Nano-X Data Types"
HREF="nxstruct.html"><LINK
REL="PREVIOUS"
TITLE="GR_EVENT_MASK"
HREF="nxstruct_GR_EVENT_MASK.html"><LINK
REL="NEXT"
TITLE="GR_EVENT_SCREENSAVER"
HREF="nxstruct_GR_EVENT_SCREENSAVER.html"></HEAD
><BODY
CLASS="REFENTRY"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Nano-X Library API</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="nxstruct_GR_EVENT_MASK.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="nxstruct_GR_EVENT_SCREENSAVER.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="NXSTRUCT.GR.EVENT.MOUSE"
><SPAN
CLASS="STRUCTNAME"
>GR_EVENT_MOUSE</SPAN
></A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN9718"
></A
><H2
>Name</H2
><SPAN
CLASS="STRUCTNAME"
>GR_EVENT_MOUSE</SPAN
>&nbsp;--&nbsp;Mouse position event structure</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN9722"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>typedef struct 
{
    GR_EVENT_TYPE   type;
    GR_WINDOW_ID    wid;
    GR_WINDOW_ID    subwid;
    GR_COORD        rootx;
    GR_COORD        rooty;
    GR_COORD        x;
    GR_COORD        y;
    GR_BUTTON       buttons;
    GR_KEYMOD       modifiers;
} GR_EVENT_MOUSE;
  </PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN9724"
></A
><H2
>Description</H2
><P
>    The <SPAN
CLASS="STRUCTNAME"
>GR_EVENT_MOUSE</SPAN
> structure is used by
    nano-X to report changes in the position of the mouse. When the
    mouse position changes only one mouse event is sent to a
    client. The event is sent to the highest window that has
    selected for the event. If the window's parent has also selected
    for mouse events, nano-X will not send an additional event for the
    parent window.
    </P
><P
>    If a window has selected both
    <TT
CLASS="CONSTANT"
>GR_EVENT_TYPE_BUTTON_DOWN</TT
> and
    <TT
CLASS="CONSTANT"
>GR_EVENT_TYPE_BUTTON_UP</TT
> events, nano-X will
    grab the mouse for that window when a mouse button is first
    pressed down within that window. While the mouse is grabbed, no
    mouse button or position events will be delivered to any window
    except the window that nano-X grabbed the mouse for. The mouse
    will remain grabbed until all of the mouse buttons are released.
    </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN9731"
></A
><H2
>Fields</H2
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN9733"
></A
><P
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><THEAD
><TR
><TH
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>Type</TH
><TH
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>Name</TH
><TH
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_EVENT_TYPE.html"
>        <SPAN
CLASS="TYPE"
>GR_EVENT_TYPE</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>type</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The event type will be either a 
        <TT
CLASS="CONSTANT"
>GR_EVENT_TYPE_MOUSE_MOTION</TT
> or a
        <TT
CLASS="CONSTANT"
>GR_EVENT_TYPE_MOUSE_POSITION</TT
> type.</TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_WINDOW_ID.html"
>        <SPAN
CLASS="TYPE"
>GR_WINDOW_ID</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>wid</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The ID of the window that the mouse event is being sent
        to. If the mouse has been grabbed then this is the window that
        nano-X grabbed the mouse for. In this case the mouse may not
        actually be positioned over the window any longer. The mouse
        may be over a child window or it may be outside the window
        that grabbed the mouse. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_WINDOW_ID.html"
>        <SPAN
CLASS="TYPE"
>GR_WINDOW_ID</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>subwid</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The ID of the window that the mouse event occurs
        in. Generally this field will be the same as
        <TT
CLASS="STRUCTFIELD"
><I
>wid</I
></TT
>, but in some cases if the mouse
        event occurs in a decendant of <TT
CLASS="STRUCTFIELD"
><I
>wid</I
></TT
>, then
        this field indicates that child window. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_COORD.html"
>        <SPAN
CLASS="TYPE"
>GR_COORD</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>rootx</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The X coordinate of the mouse pointer relative to the
        root window. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_COORD.html"
>        <SPAN
CLASS="TYPE"
>GR_COORD</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>rooty</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The Y coordinate of the mouse pointer relative to the
        root window. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_COORD.html"
>        <SPAN
CLASS="TYPE"
>GR_COORD</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>x</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The X coordinate of the mouse pointer relative to the
        window <TT
CLASS="STRUCTFIELD"
><I
>wid</I
></TT
>. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_COORD.html"
>        <SPAN
CLASS="TYPE"
>GR_COORD</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>y</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The Y coordinate of the mouse pointer relative to the
        window <TT
CLASS="STRUCTFIELD"
><I
>wid</I
></TT
>. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_BUTTON.html"
>        <SPAN
CLASS="TYPE"
>GR_BUTTON</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>buttons</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>Indicates the buttons that are being pressed.</TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_KEYMOD.html"
>        <SPAN
CLASS="TYPE"
>GR_KEYMOD</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>modifiers</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>Indicates the status of the keyboard modifier
        keys.</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN9804"
></A
><H2
>See Also</H2
><P
>      <A
HREF="nxstruct_GR_EVENT.html"
>            <SPAN
CLASS="STRUCTNAME"
>GR_EVENT</SPAN
></A
>, 
      <A
HREF="nxstruct_GR_EVENT_BUTTON.html"
>            <SPAN
CLASS="STRUCTNAME"
>GR_EVENT_BUTTON</SPAN
></A
>.
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="nxstruct_GR_EVENT_MASK.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="nxstruct_GR_EVENT_SCREENSAVER.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>GR_EVENT_MASK</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="nxstruct.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><SPAN
CLASS="STRUCTNAME"
>GR_EVENT_SCREENSAVER</SPAN
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>